import { request } from "../utils/request";

/**
 * 获取用户的关注列表（分页）
 * @param userId-用户ID
 * @param currentPage-当前页
 * @param size-每页大小
 * @returns 返回响应体格式：{"code":200,"msg":"ok","data":{"records":[{"userId":2,"username":"九洛",...}, ...],"total":2,"size":10,"current":1,"pages":1}}
 */
export const getFollowList = (userId: number | string, currentPage: number=1, size: number=10) => {
	return request({
		method: 'GET',
		url: `/mini/social/followList/${userId}?currentPage=${currentPage}&size=${size}`
	})
}

/**
 * 获取用户的粉丝列表（分页）
 * @param userId-用户ID
 * @param currentPage-当前页
 * @param size-每页大小
 */
export const getFansList = (userId: number | string, currentPage: number=1, size: number=10) => {
	return request({
		method: 'GET',
		url: `/mini/social/fansList/${userId}?currentPage=${currentPage}&size=${size}`
	})
}

/**
 * 获取互关列表分页结果
 * @param userId-用户ID
 * @param currentPage-当前页
 * @param size-每页大小
 * 
 */
export const getMutualFollowList = (userId: number | string, currentPage: number=1, size: number=10) => {
	return request({
		method: 'GET',
		url: `/mini/social/mutualFollowList/${userId}?currentPage=${currentPage}&size=${size}`
	})
}

/**
 * 获取推荐好友列表
 * @param userId-用户ID
 */
export const getRecommendFriendList = (userId: number | string) => {
	return request({
		method: 'GET',
		url: `/mini/social//recommendFriends/${userId}`
	})
}
